/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AddTeamPanel.java
 *
 * Created on Apr 25, 2011, 4:11:01 AM
 */
package soccer.view;

import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;

/**
 *
 * @author pasa
 */
public class AddTeamPanel extends javax.swing.JPanel {

    /** Creates new form AddTeamPanel */
    public AddTeamPanel() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        teamCodeLabel = new javax.swing.JLabel();
        establishDateLabel = new javax.swing.JLabel();
        teamNameLabel = new javax.swing.JLabel();
        cityLabel = new javax.swing.JLabel();
        teamCityText = new javax.swing.JTextField();
        teamCodeText = new javax.swing.JTextField();
        teamNameText = new javax.swing.JTextField();
        teamEstablishDateText = new javax.swing.JTextField();
        addTeamButton = new javax.swing.JButton();

        setLayout(null);

        teamCodeLabel.setText("TeamCode :");
        add(teamCodeLabel);
        teamCodeLabel.setBounds(46, 55, 80, 30);

        establishDateLabel.setText("Establish Date :");
        add(establishDateLabel);
        establishDateLabel.setBounds(46, 147, 90, 14);

        teamNameLabel.setText("Team Name :");
        add(teamNameLabel);
        teamNameLabel.setBounds(46, 103, 90, 14);

        cityLabel.setText("City :");
        add(cityLabel);
        cityLabel.setBounds(46, 193, 50, 14);
        add(teamCityText);
        teamCityText.setBounds(139, 190, 130, 20);

        teamCodeText.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                teamCodeTextActionPerformed(evt);
            }
        });
        add(teamCodeText);
        teamCodeText.setBounds(140, 60, 130, 20);

        teamNameText.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                teamNameTextActionPerformed(evt);
            }
        });
        add(teamNameText);
        teamNameText.setBounds(139, 97, 130, 20);
        add(teamEstablishDateText);
        teamEstablishDateText.setBounds(139, 144, 130, 20);

        addTeamButton.setText("Add new Team");
        add(addTeamButton);
        addTeamButton.setBounds(139, 239, 130, 23);
        
        JLabel lblYyyymmdd = new JLabel("(*  yyyy-MM-dd)");
        lblYyyymmdd.setBounds(299, 147, 95, 14);
        add(lblYyyymmdd);
        
        btnBackToAdminOptionsSystem = new JButton("Back to System");
        btnBackToAdminOptionsSystem.setBounds(299, 239, 119, 23);
        add(btnBackToAdminOptionsSystem);
    }// </editor-fold>//GEN-END:initComponents

    private void teamNameTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_teamNameTextActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_teamNameTextActionPerformed

    private void teamCodeTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_teamCodeTextActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_teamCodeTextActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton addTeamButton;
    private javax.swing.JLabel cityLabel;
    private javax.swing.JLabel establishDateLabel;
    public javax.swing.JTextField teamCityText;
    private javax.swing.JLabel teamCodeLabel;
    public javax.swing.JTextField teamCodeText;
    public javax.swing.JTextField teamEstablishDateText;
    private javax.swing.JLabel teamNameLabel;
    public javax.swing.JTextField teamNameText;
    private JButton btnBackToAdminOptionsSystem;
    // End of variables declaration//GEN-END:variables

   
    public void resetTextFields(){
    	this.teamCityText.setText("");
    	this.teamCodeText.setText("");
    	this.teamEstablishDateText.setText("");
    	this.teamNameText.setText("");
    }
   
    public void addCoachBackToSystem(ActionListener l){
		btnBackToAdminOptionsSystem.addActionListener(l);
	}
	
    public JButton getBtnBackToAdminOptionsSystem() {
		return btnBackToAdminOptionsSystem;
	}

	public void setBtnBackToAdminOptionsSystem(JButton btnBackToAdminOptionsSystem) {
		this.btnBackToAdminOptionsSystem = btnBackToAdminOptionsSystem;
	}

	public void addTeamActionListener(ActionListener l){
           addTeamButton.addActionListener(l);
    }

    public JButton getAddTeamButton() {
        return addTeamButton;
    }

    public void setAddTeamButton(JButton addTeamButton) {
        this.addTeamButton = addTeamButton;
    }

    public JLabel getCityLabel() {
        return cityLabel;
    }

    public void setCityLabel(JLabel cityLabel) {
        this.cityLabel = cityLabel;
    }

    public JLabel getEstablishDateLabel() {
        return establishDateLabel;
    }

    public void setEstablishDateLabel(JLabel establishDateLabel) {
        this.establishDateLabel = establishDateLabel;
    }

    public JTextField getTeamCityText() {
        return teamCityText;
    }

    public void setTeamCityText(JTextField teamCityText) {
        this.teamCityText = teamCityText;
    }

    public JLabel getTeamCodeLabel() {
        return teamCodeLabel;
    }

    public void setTeamCodeLabel(JLabel teamCodeLabel) {
        this.teamCodeLabel = teamCodeLabel;
    }

    public JTextField getTeamCodeText() {
        return teamCodeText;
    }

    public void setTeamCodeText(JTextField teamCodeText) {
        this.teamCodeText = teamCodeText;
    }

    public JTextField getTeamEstablishDateText() {
        return teamEstablishDateText;
    }

    public void setTeamEstablishDateText(JTextField teamEstablishDateText) {
        this.teamEstablishDateText = teamEstablishDateText;
    }

    public JLabel getTeamNameLabel() {
        return teamNameLabel;
    }

    public void setTeamNameLabel(JLabel teamNameLabel) {
        this.teamNameLabel = teamNameLabel;
    }

    public JTextField getTeamNameText() {
        return teamNameText;
    }

    public void setTeamNameText(JTextField teamNameText) {
        this.teamNameText = teamNameText;
    }
}
